<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>z轴</title>
  <style>
    .box{
      width: 800px;
      height: 400px;
      margin: 0 auto;
      border: 1px solid #333;
      perspective: 300px;
      /* perspective-origin: 20% 30%; */

    }
    .box img{
      transition: .8s;
      transform-origin: right;
    }
    .box:hover img{
      transform: rotateY(180deg);
    }
  </style>
</head>
<body>
  <div class="box">
    <img src="t.jpg" alt="">
  </div>
</body>
</html>